﻿
using AppSocketModel;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace BCGPSRESTful
{
    /// <summary>
    /// 登录角色
    /// </summary>
    public class RequireAuthorizeAttribute:AuthorizeAttribute
    {
        /// <summary>
        /// 登录角色
        /// </summary>
        /// <param name="role"></param>
        public RequireAuthorizeAttribute(AccountRole role)
        {
            base.Roles = role.ToString();
        } 
        
    }
}
